<template>
  <div class="page-commend">
    <div class="page-commend-header">
      <van-row>
        <van-col span="6"
          ><van-icon name="clock" />
          <p>限时抢购</p></van-col
        >
        <van-col span="6"
          ><van-icon name="tv-o" @click="onFreed"/>
          <p>免费好课</p></van-col
        >
        <van-col span="6"
          ><van-icon name="point-gift" />
          <p>新手福利</p></van-col
        >
        <van-col span="6"
          ><van-icon name="award-o" />
          <p>学习圈</p></van-col
        >
      </van-row>
    </div>

    <div class="page-commend-nav">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item><img src="../image/780.jpg"></van-swipe-item>
        <van-swipe-item><img src="../image/v2-a4f3a424a7fa112d9dc952f4745ebfb1_r.jpg"></van-swipe-item>
        <van-swipe-item><img src="../image/20201013082953734.png" ></van-swipe-item>
        <van-swipe-item><img src="../image/R-C.png" alt=""></van-swipe-item>
      </van-swipe>
    </div>
    <div class="commend-title">
      <div class="main-title">
        <span class="title">系列课</span>
        <span>快速掌握一个知识</span>
      </div>
      <van-card
        num="免费"
        price="0.00"
        desc="JAVA、MySQL"
        title="余额宝如何解决三高问题"
        thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
      />
      <van-card
        num="免费"
        price="0.00"
        desc="JAVA、MySQL"
        title="大厂养成计划day3"
        thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
      />
    </div>
  </div>
</template>
<script>
export default { name: "commend" };
</script>
<script setup>
import { useRouter } from 'vue-router';
const router=useRouter();
function onFreed(){
router.push("/course")
}
</script>
<style lang="scss" scoped>
.page-commend {
  height: 100%;
  overflow: hidden;
  &-header {
    margin: 10px 0;
    font-size: 14px;
    height: 80px;
    .van-col {
      width: 60px;
      height: 80px;
      border-radius: 50%;
      text-align: center;
      padding: 10px;
      font-size: 12px;
      line-height: 0;
      opacity: 0.5;
      color: orangered;
    }
    p {
      color: #000;
    }
    .van-icon {
      font-size: 40px;
    }
  }
  &-nav {
    height: 150px;
    width: 340px;
    margin-left: 18px;
  }
  .my-swipe .van-swipe-item {
    color: #fff;
    height: 150px;
    text-align: center;
    background-color: #39a9ed;
    img{
      width: 100%;
      height: 150px;
    }
  }
  .commend-title {
    margin: 10px;
    .main-title {
      font-size: 12px;
      .title {
        font-size: 16px;
        font-weight: bold;
        margin-right: 10px;
      }
    }
  }
}
</style>
